//
//  MainMenuButton.swift
//  AntProj
//
//  Created by 陈宇 on 2017/5/2.
//  Copyright © 2017年 🐜. All rights reserved.
//

import UIKit

class MainMenuButton: UIButton {
    
    override func awakeFromNib() {
        super.awakeFromNib()
        configure()
    }
    
    private func configure() {
        self.titleLabel?.font = UIFont.systemFont(ofSize: 13)
        self.setTitleColor(UIColor(hexString: "#777777"), for: .normal)
    }

    override func layoutSubviews() {
        super.layoutSubviews()
        
        self.imageView?.bounds.size = CGSize(width: bounds.height * 42 / 85, height: bounds.height * 42 / 85)
        self.titleLabel?.sizeToFit()
        self.imageView?.center = CGPoint(x: bounds.width / 2, y: bounds.height * 31 / 85)
        self.titleLabel?.center = CGPoint(x: bounds.width / 2, y: bounds.height * 65 / 85)
    }

}
